using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using CompanyX.Insurance.La.DataContracts;
//using CompanyX.Insurance.La.FaultContracts;

namespace CompanyX.Insurance.La.ServiceContracts
{
    /// <summary>
    /// This is the interface definition for Life &amp; Annuity insurance producer licensing &amp; appointments transactions
    /// </summary>
    /// <remarks>ACORD v2.18.02 compliant (includes custom schema extensions for operation faults)</remarks>
    //[XmlSerializerFormat]
    [ServiceContract(Name = "ProducerLicensingAndAppointments", Namespace = "urn:CompanyX.Insurance.La.ServiceContracts")]
    public interface IProducerLicensingAndAppointments
    {
        /// <summary>
        /// License Request is used to initiate a license request where the insurance carrier does 
        /// not know the producer, and the insurance carrier is the sponsoring carrier, where applicable. 
        /// This request includes information to perform a license request. This transaction also assumes 
        /// a status update as a response transaction.
        /// </summary>
        /// <param name="request">TXLife Request Data</param>
        /// <returns>TXLife Response Data</returns>
        [OperationContract(Name = "RequestProducerLicense")]
        //[FaultContract(typeof(RequestProducerLicenseFt))]
        [return: MessageParameter(Name = "TXLifeResponse")]
        TXLifeResponse RequestProducerLicense([MessageParameter(Name = "TXLifeRequest")]TXLifeRequest request);

        /// <summary>
        /// Used to return licensing information for a party that is a producer.
        /// </summary>
        /// <param name="request">TXLife Request Data</param>
        /// <returns>TXLife Response Data</returns>
        [OperationContract(Name = "GetProducerLicensingDetails")]
        //[FaultContract(typeof(GetProducerLicensingDetailsFt))]
        [return: MessageParameter(Name = "TXLifeResponse")]
        TXLifeResponse GetProducerLicensingDetails([MessageParameter(Name = "TXLifeRequest")]TXLifeRequest request);

        /// <summary>
        /// This transaction will support the assignment or reassignment of an agent, broker, or 
        /// servicing representative to a particular holding. Carriers often segment their policy-level 
        /// books of business into three categories: written, assigned and unassigned (also known as 
        /// orphaned). Written accounts are those which have been written and are serviced by the same active
        /// representative. Assigned accounts are those that are currently serviced by an active representative 
        /// who was not the original writing representative for that holding. Unassigned (orphan) accounts are 
        /// those for which the writing representative is no longer with the carrier and which have not yet been 
        /// assigned to a new representative for servicing. Often holdings within a Carrier are written but not 
        /// assigned, and as a result, many households become split households with multiple agents/brokers from 
        /// the same office or different offices servicing the household. This transaction provides the functionality 
        /// to allow a given role (say office manager) to submit a holding in one or more households for 
        /// reassignment to another agent within the Carrier, and supports the appropriate grouping of holdings
        /// by household, geographic, or market patterns and preferences of producers.
        /// </summary>
        /// <param name="request">TXLife Request Data</param>
        /// <returns>TXLife Response Data</returns>
        [OperationContract(Name = "ReassignProducerForHouseholdHoldings")]
        //[FaultContract(typeof(ReassignProducerForHouseholdHoldingsFt))]
        [return: MessageParameter(Name = "TXLifeResponse")]
        TXLifeResponse ReassignProducerForHouseholdHoldings([MessageParameter(Name = "TXLifeRequest")]TXLifeRequest request);

        /// <summary>
        /// This transaction provides a method of handling a variety of Producer inquiry messages. The intent is to 
        /// be able to either receive (or send) details regarding a Producer's Appointments, Licenses, and/or 
        /// Registrations. In addition, there is functionality to enable the sender to ask the receiver to validate, 
        /// based on their business logic, whether the Producer is appropriately Appointed, Licensed, Registered, or 
        /// all the above, meaning they actually Can Sell. All are structured around the same basic Request and Response, 
        /// but various Subtransaction codes have been defined to indicate what sort of action, and response result, is 
        /// desired. Also, the first set of Subtransactions (00..09) may be sent as a transmittal, with no response 
        /// required (i.e. a push or batch message). The first basic message is a standard Inquiry Message, where all 
        /// known details under the Producer (Appointment, Licenses and Registrations) are expected to be returned. 
        /// This is the default message if no SubTransaction is specified. Each subtransaction after that is a refinement 
        /// of this first message.
        /// </summary>
        /// <param name="request">TXLife Request Data</param>
        /// <returns>TXLife Response Data</returns>
        [OperationContract(Name = "GetProducerDetails")]
        //[FaultContract(typeof(GetProducerDetailsFt))]
        [return: MessageParameter(Name = "TXLifeResponse")]
        TXLifeResponse GetProducerDetails([MessageParameter(Name = "TXLifeRequest")]TXLifeRequest request);

        /// <summary>
        /// This transaction provides a method of transmitting a variety of Producer inquiry messages. The first 
        /// basic message is a standard Inquiry Message, where all known details under the Producer (Appointments,
        /// Licenses, and Registrations) are expected to be returned. This is the default message if no SubTransaction 
        /// is specified. Each subtransaction after that is a refinement of this first message.
        /// </summary>
        /// <param name="request">TXLife Request Data</param>
        /// <returns>TXLife Response Data</returns>
        [OperationContract(Name = "SendProducerDetails")]
        //[FaultContract(typeof(SendProducerDetailsFt))]
        [return: MessageParameter(Name = "TXLifeResponse")]
        TXLifeResponse SendProducerDetails([MessageParameter(Name = "TXLifeRequest")]TXLifeRequest request);

        /// <summary>
        /// Appointment Request is used to initiate either an initial appointment for a producer with an insurance 
        /// carrier or a subsequent appointment. This transaction may also trigger a status update as a response 
        /// transaction (via the CaseStatusOnResponseInd). The Appointment Request may require a license request at 
        /// the same time. This occurs in a nonresident state where the insurance carrier is the sponsoring carrier 
        /// and simultaneously applying for the state appointment, which will occur at the completion of the state 
        /// nonresident license application process. This transaction also assumes a status update as a response 
        /// transaction. For Subsequent appointments, it is not necessary to repeat much of the detail, only to provide 
        /// data that has changed. The receiver is to assume that any provided data are changes and should update their 
        /// records accordingly. The sender should only send the required data and only additional data that is an update 
        /// from the Initial appointment.
        /// </summary>
        /// <param name="request">TXLife Request Data</param>
        /// <returns>TXLife Response Data</returns>
        [OperationContract(Name = "RequestProducerAppointment")]
        //[FaultContract(typeof(RequestProducerAppointmentFt))]
        [return: MessageParameter(Name = "TXLifeResponse")]
        TXLifeResponse RequestProducerAppointment([MessageParameter(Name = "TXLifeRequest")]TXLifeRequest request);

        /// <summary>
        /// Used to initiate each appointment renewal request. The request may be due to either State requirements or Carrier 
        /// policy. Producers are grouped by renewal state and each file may contain one or more state renewals.
        /// </summary>
        /// <param name="request">TXLife Request Data</param>
        /// <returns>TXLife Response Data</returns>
        [OperationContract(Name = "RenewProducerAppointment")]
        //[FaultContract(typeof(RenewProducerAppointmentFt))]
        [return: MessageParameter(Name = "TXLifeResponse")]
        TXLifeResponse RenewProducerAppointment([MessageParameter(Name = "TXLifeRequest")]TXLifeRequest request);

        /// <summary>
        /// Used by the carrier to verify that the distributor or producer wants to renew existing appointments used to initiate 
        /// each appointment renewal request.
        /// </summary>
        /// <param name="request">TXLife Request Data</param>
        /// <returns>TXLife Response Data</returns>
        [OperationContract(Name = "NotifyProducerAppointmentNonRenewal")]
        //[FaultContract(typeof(NotifyProducerAppointmentNonRenewalFt))]
        [return: MessageParameter(Name = "TXLifeResponse")]
        TXLifeResponse NotifyProducerAppointmentNonRenewal([MessageParameter(Name = "TXLifeRequest")]TXLifeRequest request);

        /// <summary>
        /// Used when one or more producer appointments are being terminated. This could be due to the producer still holding at 
        /// least his/her active resident state license/appointment, or due to a producer's change in residence state (whereby the 
        /// producer is pursuing a new resident state license &amp; appointment). This transaction may be used to notify the recipient 
        /// to terminate a specific line of authority or a full state appointment.
        /// </summary>
        /// <param name="request">TXLife Request Data</param>
        /// <returns>TXLife Response Data</returns>
        [OperationContract(Name = "TerminateProducerAppointment")]
        //[FaultContract(typeof(TerminateProducerAppointmentFt))]
        [return: MessageParameter(Name = "TXLifeResponse")]
        TXLifeResponse TerminateProducerAppointment([MessageParameter(Name = "TXLifeRequest")]TXLifeRequest request);
    }
}
